package com.ss.android.wenda.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;

public class UserPrivilege implements Parcelable {
    public static final Parcelable.Creator CREATOR;
    @SerializedName("can_comment_answer") public boolean isCanCommentAnswer;
    @SerializedName("can_delete_answer") public boolean isCanDeleteAnswer;
    @SerializedName("can_digg_answer") public boolean isCanDiggAnswer;

    static {
        CREATOR = new l();
    }

    public UserPrivilege() {

    }

    protected UserPrivilege(Parcel arg4) {
        boolean v1 = true;

        boolean v0 = arg4.readByte() != 0 ? true : false;
        this.isCanDeleteAnswer = v0;
        v0 = arg4.readByte() != 0 ? true : false;
        this.isCanCommentAnswer = v0;
        if(arg4.readByte() == 0) {
            v1 = false;
        }

        this.isCanDiggAnswer = v1;
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel arg4, int arg5) {
        byte v1 = 1;
        byte v0 = (byte) (this.isCanDeleteAnswer ? 1 : 0);
        arg4.writeByte(v0);
        v0 = (byte) (this.isCanCommentAnswer ? 1 : 0);
        arg4.writeByte(v0);
        if(!this.isCanDiggAnswer) {
            v1 = 0;
        }

        arg4.writeByte(v1);
    }
}

